<template>
  <div style="width:100vw;" class="education-box">
    <!-- <div class="record-header">
      <mt-header fixed title="专利详情">
        <router-link to="/patent" slot="left">
          <mt-button class="back-butt" icon="back"></mt-button>
        </router-link>
      </mt-header>
    </div>-->
    <div class="bscroll" ref="bscroll">
      <div class="bscroll-container">
        <div class="education-body">
          <!-- <div class="education-bodyhead">学历信息</div> -->
          <div class="patent-banner">
            <img src="@/assets/homePicture/detail1.jpg" alt />
          </div>

          <div class="record-detail">
            <div class="record-item">
              <p class="item-tip">知识产权名称：</p>
              <p class="item-content">{{patentDetails.name}}</p>
            </div>
            <div class="record-item">
              <p class="item-tip">授权日期：</p>
              <p class="item-content">{{patentDetails.licenseTime}}</p>
            </div>
            <div class="record-item">
              <p class="item-tip">发明人：</p>
              <p class="item-content">{{patentDetails.userName}}</p>
            </div>
            <div class="record-item">
              <p class="item-tip">提案号：</p>
              <p class="item-content">{{patentDetails.patentNumber}}</p>
            </div>
            <div class="record-item">
              <p class="item-tip">参与角色：</p>
              <p class="item-content">{{patentDetails.patentPost}}</p>
            </div>
            <div class="record-item">
              <p class="item-tip">专利权人：</p>
              <p class="item-content">{{patentDetails.patentPerson}}</p>
            </div>
            <div class="record-item" style="display:none;">
              <p class="item-tip">专利内部编号：</p>
              <p class="item-content">{{patentDetails.patentInternalNumber}}</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import BScroll from "better-scroll";
export default {
  name: "patentFetails",
  data() {
    return {
      msg: "",
      patentDetails: {}
    };
  },
  mounted() {
    let { id } = this.$route.query;
    let params = {
      id
    };
    this.$get("getPanent", params).then(res => {
      if (res.success) {
        for(let k in res.data){
          if(k == 'licenseTime'){
            res.data[k] = res.data[k].split(' ')[0]
          }
        }
        this.patentDetails = res.data;
      }
    });
    // better-scroll初始化
    this.$nextTick(() => {
      let bscrollDom = this.$refs.bscroll;
      this.aBScroll = new BScroll(bscrollDom, {
        click: true
      });
    });
  },
  methods: {}
};
</script>
<style lang="less" scoped>
@import url("~@/pagecss/education.less");
</style>